package com.n9.qq.android.login.tlv;

import com.n9.qq.util.Util;

/**
 * @author ice
 * @since 2019/2/12 14:18
 */
public class Tlv0177 extends BaseTlv {

    public Tlv0177() {
        this.cmd = 0x0177;
    }

    /**
     * @param releaseTime   1466409993
     * @param sdkVersion    6.3.1.1583
     * @return
     */
    public byte[] getData(long releaseTime, String sdkVersion) {
        byte[] var5 = new byte[0];
        if (sdkVersion != null) {
            var5 = sdkVersion.getBytes();
        }

        int len = var5.length + 7;
        byte[] data = new byte[len];
        Util.int8_to_buf(data, 0, 1);
        Util.int64_to_buf32(data, 1, releaseTime);
        Util.int16_to_buf(data, 5, var5.length);
        System.arraycopy(var5, 0, data, 7, var5.length);
        return this.getBufData(data);
    }

}
